/*
 * @Description:
 *
 * @Author: XiongYaoYuan<xiongyaoyuan>
 * @Date: 2023-06-27 20:17:10
 * @FilePath: /yuxiuproweb/src/api/material/inventory/index.js
 */
import request from "@/utils/request";

// 查询材料库存列表
export function listInventory(query) {
  return request({
    url: "/md/inventory/list",
    method: "get",
    params: query,
  });
}

// 查询材料库存详细
export function getInventory(fabricInventoryId) {
  return request({
    url: "/md/inventory/" + fabricInventoryId,
    method: "get",
  });
}

// 新增材料库存
export function addInventory(data) {
  return request({
    url: "/md/inventory",
    method: "post",
    data: data,
  });
}

// 修改材料库存
export function updateInventory(data) {
  return request({
    url: "/md/inventory",
    method: "put",
    data: data,
  });
}

// 删除材料库存
export function delInventory(fabricInventoryId) {
  return request({
    url: "/md/inventory/" + fabricInventoryId,
    method: "delete",
  });
}
// 仓库调拨
export function transferInventory(data) {
  return request({
    url: "/md/inventory/transfer",
    method: "put",
    data: data,
  });
}
